/*******************************************************************************
 ** Name: room.cpp                                                            **
 ** Description:              **
 **                                                                           **
 ** Open Source Initiative (OSI) Approved License                             **
 **                                                                           **
 ** The contents of this file are subject to the terms of the                 **
 ** Common Development and Distribution License, Version 1.0 only             **
 ** (the "License").  You may not use this file except in compliance          **
 ** with the License.                                                         **
 **                                                                           **
 ** You can find a copy of the license in the license.txt within              **
 ** this distribution or at http://www.munixos.net/licensing.                 **
 ** Software distributed under the License is distributed on an "AS IS"       **
 ** basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.           **
 ** See the License for the specific language governing permissions           **
 ** and limitations under the License.                                        **
 **                                                                           **
 ** When distributing Covered Code, include this CDDL header in each          **
 ** file and include the License file at $$HOME/license.txt.                   **
 ** If applicable, add the following below this header, with the indicated    **
 ** fields enclosed by brackets "[]" replaced with your own identifying       **
 ** information: Portions Copyright [yyyy] [name of copyright owner]          **
 **                                                                           **
 **                                                                           **
 ** Copyright (c) 2009-2012  Barry Gian James <gian@gamingods.net>            **
 ** All rights reserved.                                                      **
 **                                                                           **
 ******************************************************************************/

// $$Id$$
// Last Modified by $$Author$$

#include <math.h>
#include "room.hpp"

///////////////////////////////////////////[class Position
bool
Position::Within(ushort d, const Position & p)
{
	double distance = sqrt( (double)( ((x-p.x)^2) + ((y-p.y)^2)) );
	if (d <= distance)
		return true;
	else
		return false;
}


///////////////////////////////////////////[class Portal
Portal::Portal()
{

}

Portal::Portal(const Portal &p)
{

}
void
Portal::DetachDevice(entity_t id)
{

}

boost::shared_ptr<Device>
Portal::GetDevice(std::string &t)
{
	boost::shared_ptr<Device> d;

	return d;
}

///////////////////////////////////////////[class Room
Room::Room()
{

}

Room::Room(const Room &r)
{

}

void
Room::RemoveItem(entity_t id)
{

}

void
Room::RemoveCharacter(entity_t id)
{

}

boost::shared_ptr<Character>
Room::GetCharacter(entity_t id)
{
	boost::shared_ptr<Character> c;


	return c;
}

boost::shared_ptr<Character>
Room::GetCharacter(std::string &c)
{
	boost::shared_ptr<Character> cp;

	return cp;
}
